package com.x.provider.customer.configure;

import com.x.kafka.MqTemplate;
import com.x.kafka.impl.MqKafkaTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.annotation.EnableKafka;
import org.springframework.kafka.core.KafkaTemplate;

//@EnableKafka
@Configuration
public class CustomerMqConfig {

    @Autowired
    private KafkaTemplate<String, Object> kafkaTemplate;

    boolean enable = false;

    @Bean
    public MqTemplate mqTemplate(){
        return new MqKafkaTemplate(kafkaTemplate, enable);
    }

}
